<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    async function foo() { 
      await fun()
      console.log('10000000');
      
    }
    async function fun() {
      return Promise.resolve('1000')
    }
    foo()
    new Promise((res, rej) => {
      Promise.resolve().then(() => {
        Promise.resolve('1000').then(res)
      })
    }).then(res => {
      console.log('1000');      
    })
    new Promise((res, rej) => {
      res(Promise.resolve('2000'))
    }).then(res => {
      console.log(res);
      
    })
    new Promise((resolve, reject) => {
      resolve()
    }).then(res => {
      return 1000
    }).then(() => {
      console.log('c20');
      
    })
    Promise.resolve('100').then(res => {
      console.log(res);
    })
  </script>
</body>

</html>